package fc.free.com.controller;


import fc.free.com.facade.IUserService;
import fc.free.com.po.CoreUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;

@RestController
public class ExampleController {

    @Autowired
    private IUserService userService;

    @GetMapping("/person")
    public ModelAndView index() {
        CoreUser user = new CoreUser();
        user.setName("name");
        userService.save(user);
//        return new ModelAndView("user/user", "userList", userList);
        return new ModelAndView("user/user");
    }
}
